package com.example.lkslib.common;

import android.app.Application;

import com.example.lkslib.lksBus.LksBus;

import org.greenrobot.eventbus.EventBus;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/6/12.
 */

public abstract class LksApplication {

    public static Application application;
    public  void onCreate(Application application){
        this.application = application;
    }


    public  void onTerminate(){
    }
//    protected void reflect(Class obj) {
//        if (obj == null) return;
//        Field[] fields = obj.getDeclaredFields();
//        codes.clear();
//        for(Field f : fields){
//            String type = f.getGenericType().toString(); // 获取属性的类型
//            if(type.endsWith("int") || type.endsWith("Integer")){
//                Object  val = null;
//                try {
//                    val = f.get(obj);
//                    codes.add((Integer)val);
//                } catch (IllegalAccessException e) {
//                    e.printStackTrace();
//                }
//            }
//        }
//    }
    public abstract LksBus getLksBus();
}
